import 'dart:math';

const kNames = {
  "talented year",
  "talented experience",
  "talented notebook",
  "talented class",
  "talented shake",
  "talented ray",
  "talented ring",
  "talented cat",
  "talented van",
  "talented twist",
  "talented shade",
  "talented trick",
  "talented prose",
  "talented spot",
  "talented bat",
  "talented oatmeal",
  "talented suggestion",
  "talented invention",
  "talented letters",
  "talented collar",
  "honorable year",
  "honorable experience",
  "honorable notebook",
  "honorable class",
  "honorable shake",
  "honorable ray",
  "honorable ring",
  "honorable cat",
  "honorable van",
  "honorable twist",
  "honorable shade",
  "honorable trick",
  "honorable prose",
  "honorable spot",
  "honorable bat",
  "honorable oatmeal",
  "honorable suggestion",
  "honorable invention",
  "honorable letters",
  "honorable collar",
  "rustic year",
  "rustic experience",
  "rustic notebook",
  "rustic class",
  "rustic shake",
  "rustic ray",
  "rustic ring",
  "rustic cat",
  "rustic van",
  "rustic twist",
  "rustic shade",
  "rustic trick",
  "rustic prose",
  "rustic spot",
  "rustic bat",
  "rustic oatmeal",
  "rustic suggestion",
  "rustic invention",
  "rustic letters",
  "rustic collar",
  "tested year",
  "tested experience",
  "tested notebook",
  "tested class",
  "tested shake",
  "tested ray",
  "tested ring",
  "tested cat",
  "tested van",
  "tested twist",
  "tested shade",
  "tested trick",
  "tested prose",
  "tested spot",
  "tested bat",
  "tested oatmeal",
  "tested suggestion",
  "tested invention",
  "tested letters",
  "tested collar",
  "motionless year",
  "motionless experience",
  "motionless notebook",
  "motionless class",
  "motionless shake",
  "motionless ray",
  "motionless ring",
  "motionless cat",
  "motionless van",
  "motionless twist",
  "motionless shade",
  "motionless trick",
  "motionless prose",
  "motionless spot",
  "motionless bat",
  "motionless oatmeal",
  "motionless suggestion",
  "motionless invention",
  "motionless letters",
  "motionless collar",
  "draconian year",
  "draconian experience",
  "draconian notebook",
  "draconian class",
  "draconian shake",
  "draconian ray",
  "draconian ring",
  "draconian cat",
  "draconian van",
  "draconian twist",
  "draconian shade",
  "draconian trick",
  "draconian prose",
  "draconian spot",
  "draconian bat",
  "draconian oatmeal",
  "draconian suggestion",
  "draconian invention",
  "draconian letters",
  "draconian collar",
  "disturbed year",
  "disturbed experience",
  "disturbed notebook",
  "disturbed class",
  "disturbed shake",
  "disturbed ray",
  "disturbed ring",
  "disturbed cat",
  "disturbed van",
  "disturbed twist",
  "disturbed shade",
  "disturbed trick",
  "disturbed prose",
  "disturbed spot",
  "disturbed bat",
  "disturbed oatmeal",
  "disturbed suggestion",
  "disturbed invention",
  "disturbed letters",
  "disturbed collar",
  "whispering year",
  "whispering experience",
  "whispering notebook",
  "whispering class",
  "whispering shake",
  "whispering ray",
  "whispering ring",
  "whispering cat",
  "whispering van",
  "whispering twist",
  "whispering shade",
  "whispering trick",
  "whispering prose",
  "whispering spot",
  "whispering bat",
  "whispering oatmeal",
  "whispering suggestion",
  "whispering invention",
  "whispering letters",
  "whispering collar",
  "mindless year",
  "mindless experience",
  "mindless notebook",
  "mindless class",
  "mindless shake",
  "mindless ray",
  "mindless ring",
  "mindless cat",
  "mindless van",
  "mindless twist",
  "mindless shade",
  "mindless trick",
  "mindless prose",
  "mindless spot",
  "mindless bat",
  "mindless oatmeal",
  "mindless suggestion",
  "mindless invention",
  "mindless letters",
  "mindless collar",
  "bewildered year",
  "bewildered experience",
  "bewildered notebook",
  "bewildered class",
  "bewildered shake",
  "bewildered ray",
  "bewildered ring",
  "bewildered cat",
  "bewildered van",
  "bewildered twist",
  "bewildered shade",
  "bewildered trick",
  "bewildered prose",
  "bewildered spot",
  "bewildered bat",
  "bewildered oatmeal",
  "bewildered suggestion",
  "bewildered invention",
  "bewildered letters",
  "bewildered collar",
  "judicious year",
  "judicious experience",
  "judicious notebook",
  "judicious class",
  "judicious shake",
  "judicious ray",
  "judicious ring",
  "judicious cat",
  "judicious van",
  "judicious twist",
  "judicious shade",
  "judicious trick",
  "judicious prose",
  "judicious spot",
  "judicious bat",
  "judicious oatmeal",
  "judicious suggestion",
  "judicious invention",
  "judicious letters",
  "judicious collar",
  "synonymous year",
  "synonymous experience",
  "synonymous notebook",
  "synonymous class",
  "synonymous shake",
  "synonymous ray",
  "synonymous ring",
  "synonymous cat",
  "synonymous van",
  "synonymous twist",
  "synonymous shade",
  "synonymous trick",
  "synonymous prose",
  "synonymous spot",
  "synonymous bat",
  "synonymous oatmeal",
  "synonymous suggestion",
  "synonymous invention",
  "synonymous letters",
  "synonymous collar",
  "meek year",
  "meek experience",
  "meek notebook",
  "meek class",
  "meek shake",
  "meek ray",
  "meek ring",
  "meek cat",
  "meek van",
  "meek twist",
  "meek shade",
  "meek trick",
  "meek prose",
  "meek spot",
  "meek bat",
  "meek oatmeal",
  "meek suggestion",
  "meek invention",
  "meek letters",
  "meek collar",
  "possible year",
  "possible experience",
  "possible notebook",
  "possible class",
  "possible shake",
  "possible ray",
  "possible ring",
  "possible cat",
  "possible van",
  "possible twist",
  "possible shade",
  "possible trick",
  "possible prose",
  "possible spot",
  "possible bat",
  "possible oatmeal",
  "possible suggestion",
  "possible invention",
  "possible letters",
  "possible collar",
  "imperfect year",
  "imperfect experience",
  "imperfect notebook",
  "imperfect class",
  "imperfect shake",
  "imperfect ray",
  "imperfect ring",
  "imperfect cat",
  "imperfect van",
  "imperfect twist",
  "imperfect shade",
  "imperfect trick",
  "imperfect prose",
  "imperfect spot",
  "imperfect bat",
  "imperfect oatmeal",
  "imperfect suggestion",
  "imperfect invention",
  "imperfect letters",
  "imperfect collar",
  "frantic year",
  "frantic experience",
  "frantic notebook",
  "frantic class",
  "frantic shake",
  "frantic ray",
  "frantic ring",
  "frantic cat",
  "frantic van",
  "frantic twist",
  "frantic shade",
  "frantic trick",
  "frantic prose",
  "frantic spot",
  "frantic bat",
  "frantic oatmeal",
  "frantic suggestion",
  "frantic invention",
  "frantic letters",
  "frantic collar",
  "grouchy year",
  "grouchy experience",
  "grouchy notebook",
  "grouchy class",
  "grouchy shake",
  "grouchy ray",
  "grouchy ring",
  "grouchy cat",
  "grouchy van",
  "grouchy twist",
  "grouchy shade",
  "grouchy trick",
  "grouchy prose",
  "grouchy spot",
  "grouchy bat",
  "grouchy oatmeal",
  "grouchy suggestion",
  "grouchy invention",
  "grouchy letters",
  "grouchy collar",
  "zany year",
  "zany experience",
  "zany notebook",
  "zany class",
  "zany shake",
  "zany ray",
  "zany ring",
  "zany cat",
  "zany van",
  "zany twist",
  "zany shade",
  "zany trick",
  "zany prose",
  "zany spot",
  "zany bat",
  "zany oatmeal",
  "zany suggestion",
  "zany invention",
  "zany letters",
  "zany collar",
  "erratic year",
  "erratic experience",
  "erratic notebook",
  "erratic class",
  "erratic shake",
  "erratic ray",
  "erratic ring",
  "erratic cat",
  "erratic van",
  "erratic twist",
  "erratic shade",
  "erratic trick",
  "erratic prose",
  "erratic spot",
  "erratic bat",
  "erratic oatmeal",
  "erratic suggestion",
  "erratic invention",
  "erratic letters",
  "erratic collar",
  "exuberant year",
  "exuberant experience",
  "exuberant notebook",
  "exuberant class",
  "exuberant shake",
  "exuberant ray",
  "exuberant ring",
  "exuberant cat",
  "exuberant van",
  "exuberant twist",
  "exuberant shade",
  "exuberant trick",
  "exuberant prose",
  "exuberant spot",
  "exuberant bat",
  "exuberant oatmeal",
  "exuberant suggestion",
  "exuberant invention",
  "exuberant letters",
  "exuberant collar",
};

const k1 = [
  "talented",
  "honorable",
  "rustic",
  "tested",
  "motionless",
  "draconian",
  "disturbed",
  "whispering",
  "mindless",
  "bewildered",
  "judicious",
  "synonymous",
  "meek",
  "possible",
  "imperfect",
  "frantic",
  "grouchy",
  "zany",
  "erratic",
  "exuberant",
];

const k2 = [
  "year",
  "experience",
  "notebook",
  "class",
  "shake",
  "ray",
  "ring",
  "cat",
  "van",
  "twist",
  "shade",
  "trick",
  "prose",
  "spot",
  "bat",
  "oatmeal",
  "suggestion",
  "invention",
  "letters",
  "collar",
];

// void gen() {
//   for (int i = 0; i < k1.length; i++) {
//     for (int j = 0; j < k2.length; j++) {
//       print("\"${k1[i]} ${k2[j]}\",");
//     }
//   }
// }
class NameGenerator {
  Set<String> usedNames = {};
  Set<String> availableNames = {...kNames};
  final rand = Random();
  int count = 0;

  String generate({
    required Set<String> namesToExclude,
  }) {
    usedNames.addAll(namesToExclude);
    availableNames.removeAll(usedNames);

    if (availableNames.isEmpty) {
      count++;
      availableNames.addAll(kNames.map((e) => "$e $count"));
      return generate(namesToExclude: usedNames);
    }

    final name = availableNames.elementAt(rand.nextInt(availableNames.length));
    return name;
  }
}
